Relational Model Concepts
In this lesson, we will discuss the fundamentals of relational databases.
Why use relational data models?#
The relational data model was introduced by C.F. Codd in 1970. Currently, it is the most widely used data model.
The relational model has provided the basis for:
- Research on the theory of data/relationship/constraint.
- Numerous database design methodologies.
- The standard database access language called Structured Query Language (SQL).
- Almost all modern commercial database management systems.
The relational data model describes the world as “a collection of inter-related relations (or tables).”
What is relational model?#
The relational model represents the database as a collection of relations. A relation is nothing but a table of values. Every row in the table represents a collection of related data values. These rows in the table denote a real-world entity or relationship. The table and column names are helpful to interpret the meaning of values in each row.
Some popular relational database management systems are:
- DB2 and Informix Dynamic Server - IBM
- Oracle and RDB – Oracle
- SQL Server and Access - Microsoft
Fundamental concepts of the relational data model#
Consider a relation STUDENT as shown below:
-
Attribute: Each column in a table. Attributes are the properties that define a relation, e.g.,
Roll_No
,Name
, etc. -
Tuple: It is nothing but a single row of a table, which contains a single record. The above relation contains 4 tuples.
-
Relation schema: A relation schema represents the name of the relation with its attributes. e.g; STUDENT (
Roll_No
,Name
,Address
,Phone
, andAge
) is a relation schema for the STUDENT relation. -
Degree: The number of attributes in the relation is known as the degree of the relation. The STUDENT relation defined above has a degree of 5.
-
Cardinality: The number of tuples in a relation is known as cardinality. The STUDENT relation defined above has a cardinality of 4.
-
Relation instance: The set of tuples in a relation at a particular instance in time is called a relation instance. It changes whenever we insert, delete or update the database.
-
NULL values: The value which is not known or unavailable is called a NULL value. In the STUDENT relation, we see that the phone number of a STUDENT whose
Roll_No
is 4 is set to NULL. -
Domain: A domain is the original set of atomic values used to model data. By atomic value, we mean that each value in the domain is indivisible as far as the relational model is concerned. In other words, a domain is a set of acceptable values that a column is allowed to contain. For example:
-
Name: The set of character strings that represent the name of a person.
-
Age: Possible ages of students in a university; each must be an integer value between 17 and 27.
-
Now that you are familiar with the terminology used in relational models, in the next lesson we will highlight some of the important properties of relational tables.